$(function(){	
	$('#bgTop').stop().animate({opacity:1,right:'0',top:'-370px'},1000,'easeOutCirc');
	$('#bgBottom').stop().animate({opacity:1,left:'200px',bottom:'-100px'},3000,'easeOutCirc');
	
	//footerMenu 上拉kind & list選單	
	$('.footerMenu li').hover(function(){								
		$(this).stop().animate({'background-position':'0 0'});
		$(this).children('.ptKind').stop(true,true).slideToggle(500);
	},function(){
		$(this).stop().animate({'background-position':'-160px 0'});
		$(this).children('.ptKind').stop(true,true).slideToggle(500);
	});
	$('.footerMenu li .ptKind li').hover(function(){								
		$(this).children('.ptList').stop(true,true).slideToggle(300);
	},function(){
		$(this).children('.ptList').stop(true,true).slideToggle(300);
	});
});

/* function to fix the -10000 pixel limit of jquery.animate */
$.fx.prototype.cur = function(){
    if ( this.elem[this.prop] != null && (!this.elem.style || this.elem.style[this.prop] == null) ) {
      return this.elem[ this.prop ];
    }
    var r = parseFloat( jQuery.css( this.elem, this.prop ) );
    return typeof r == 'undefined' ? 0 : r;
}

//固定div
function resize_div(objClass,objX,objY,objRight,objBottom){
	//先抓使用者螢幕解析度
	var orgX = screen.width;
	var orgY = screen.height;
	var midX = 1000;
	var midY = 600;
	
	var lastLeft = 0;
	var lastTop = 0;
	
	if(objRight != 'none'){
		if( $(window).width() > orgX ){
			lastLeft = orgX - objX - objRight;	
		}else if( $(window).width() < midX ){
			lastLeft = midX - objX - objRight;
		}else{
			lastLeft = $(window).width() - objX - objRight;
		}
		$(objClass).css("left",lastLeft+"px" );
	}
	
	if(objBottom != 'none'){
		if( $(window).height() > orgY ){
			lastTop = orgY - objY - objBottom;	
		}else if( $(window).height() < midY ){
			lastTop = midY - objY - objBottom;
		}else{
			lastTop = $(window).height() - objY - objBottom;
		}
		$(objClass).css("top",lastTop+"px" );
	}	
}



$(document).ready(function(){
	
	$(".about").text("关于183°C");
$(".product").text("产品介绍");
$(".shop").text("投资分析");
$(".news").text("品牌优势");
$(".contact").text("联系我们");
	
});

